﻿namespace Deppton.Mobile.Views
{
    using System;

    public partial class AcquiringGpsPositionForm : DepptonForm
    {
        public event EventHandler ContinueCheckChanged;

        public AcquiringGpsPositionForm()
        {
            this.InitializeComponent();
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.GpsIconPictureBox.Image = Properties.Resources.Gps;
        }

        public bool CapturePositionChecked
        {
            get
            {
                return this.CapturePositionCheckBox.Checked;
            }
        }

        public string AcquiringLegend
        {
            get
            {
                return this.AqcuiringLabel.Text;
            }
            set
            {
                this.AqcuiringLabel.Text = value;
            }
        }

        public bool AllowContinue
        {
            get
            {
                return this.ContinueMenuItem.Enabled;
            }
            set
            {
                this.ContinueMenuItem.Enabled = value;
            }
        }

        public string ResultsLegend
        {
            get
            {
                return this.ResultsLabel.Text;
            }
            set
            {
                this.ResultsLabel.Text = value;
            }
        }

        private void ContinueCheckBoxCheckStateChanged(object sender, System.EventArgs e)
        {
            if (this.ContinueCheckChanged != null)
            {
                this.ContinueCheckChanged(this, EventArgs.Empty);
            }
        }

        private void ContinueMenuItemClick(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }

        private void BackMenuItemClick(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.Close();
        }
    }
}